<!DOCTYPE html>
<html lang="zh-cmn-Hans">
  <head>
    {% block head %}
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <title>{% block title %}{% endblock %}</title>
    {% if not current_app.debug %}
        <!-- Custom fonts for this template-->
        <link href="{{ url_for('static', filename='vendor/fontawesome-free/css/all.min.css') }}" rel="stylesheet" type="text/css" />
        <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet" />
        <!-- Custom styles for this template-->
        <link href="https://cdn.bootcdn.net/ajax/libs/startbootstrap-sb-admin-2/4.0.7/css/sb-admin-2.min.css" rel="stylesheet">
        <!-- Custom styles for this page -->
        <link href="{{ url_for('static', filename='vendor/datatables/dataTables.bootstrap4.min.css') }}" rel="stylesheet" />
        <!-- 模态消息对话框 https://sweetalert.js.org/ -->
        <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/sweetalert.css') }}" />
        <!-- 图片查看器 https://github.com/fengyuanchen/viewerjs -->
        <link href="https://cdn.bootcdn.net/ajax/libs/viewerjs/1.7.1/viewer.min.css" rel="stylesheet">
        <!-- 消息提示 https://github.com/marcelodolza/iziToast -->
        <link href="https://cdn.bootcdn.net/ajax/libs/izitoast/1.4.0/css/iziToast.min.css" rel="stylesheet">
    {% else %}
        <!-- Custom fonts for this template-->
        <link href="{{ url_for('static', filename='vendor/fontawesome-free/css/all.min.css') }}" rel="stylesheet" type="text/css" />
        <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet" />
        <!-- Custom styles for this template-->
        <link href="{{ url_for('static', filename='css/sb-admin-2.min.css') }}" rel="stylesheet" />
        <!-- Custom styles for this page -->
        <link href="{{ url_for('static', filename='vendor/datatables/dataTables.bootstrap4.min.css') }}" rel="stylesheet" />
        <!-- 模态消息对话框 https://sweetalert.js.org/ -->
        <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/sweetalert.css') }}" />
        <!-- 图片查看器 https://github.com/fengyuanchen/viewerjs -->
        <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/viewer.min.css') }}" />
        <!-- 消息提示 https://github.com/marcelodolza/iziToast -->
        <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/iziToast.min.css') }}" />
    {% endif %}
    <link rel="shortcut icon" href="{{url_for('static',filename='img/favicon.ico')}}" type="image/x-icon" />
    <!-- 加载效果 -->
    <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/loading.css') }}" />
    <!-- 我的 -->
    <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='css/my.css') }}" />
    {% endblock %}
  </head>

  <body id="page-top">
    <!-- Page Wrapper -->
    <div id="wrapper">
      <!-- Sidebar -->
      <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
        <!-- Sidebar - Brand -->
        <a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.html">
          <div class="sidebar-brand-icon rotate-n-15">
            <i class="fas fa-laugh-wink"></i>
          </div>
          <div class="sidebar-brand-text mx-3">文件分享 <sup>v1.0</sup></div>
        </a>

        <!-- Divider -->
        <hr class="sidebar-divider my-0" />

        <!-- Nav Item - Pages Collapse Menu -->
        <li class="nav-item" id="file-page">
          <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
            <i class="fas fa-fw fa-cog"></i>
            <span>全部文件</span>
          </a>
          <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
            <div class="bg-white py-2 collapse-inner rounded">
              <!-- <h6 class="collapse-header">自定义组件:</h6> -->
              <a class="collapse-item" href="{{ url_for('file.page') }}">所有</a>
              <a class="collapse-item" href="{{ url_for('filetype.image_page') }}">图片</a>
              <a class="collapse-item" href="{{ url_for('filetype.document_page') }}">文档</a>
              <a class="collapse-item" href="{{ url_for('filetype.video_page') }}">视频</a>
              <a class="collapse-item" href="{{ url_for('filetype.torrent_page') }}">种子</a>
              <a class="collapse-item" href="{{ url_for('filetype.radio_page') }}">音乐</a>
              <a class="collapse-item" href="{{ url_for('filetype.other_page') }}">其他</a>
            </div>
        </li>

        <!-- Nav Item - Charts -->
        <li class="nav-item" id="share-page">
          <a class="nav-link" href="{{ url_for('share.page') }}">
            <i class="fas fa-fw fa-chart-area"></i>
            <span>我的分享</span>
          </a>
        </li>

        <!-- Nav Item - Tables -->
        <li class="nav-item">
          <a class="nav-link" href="#">
            <i class="fas fa-fw fa-table"></i>
            <span>回收站</span>
          </a>
        </li>

        <!-- Divider -->
        <hr class="sidebar-divider d-none d-md-block" />

        <!-- Sidebar Toggler (Sidebar) -->
        <div class="text-center d-none d-md-inline">
          <button class="rounded-circle border-0" id="sidebarToggle"></button>
        </div>
      </ul>
      <!-- End of Sidebar -->

      <!-- Content Wrapper -->
      <div id="content-wrapper" class="d-flex flex-column">
        <!-- Main Content -->
        <div id="content">
          <!-- Topbar -->
          <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
            <!-- Sidebar Toggle (Topbar) -->
            <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
              <i class="fa fa-bars"></i>
            </button>

            <!-- Topbar Search -->
            <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
              <div class="input-group">
                <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2" />
                <div class="input-group-append">
                  <button class="btn btn-primary" type="button">
                    <i class="fas fa-search fa-sm"></i>
                  </button>
                </div>
              </div>
            </form>

            <!-- Topbar Navbar -->
            <ul class="navbar-nav ml-auto">
              <!-- Nav Item - Search Dropdown (Visible Only XS) -->
              <li class="nav-item dropdown no-arrow d-sm-none">
                <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fas fa-search fa-fw"></i>
                </a>
                <!-- Dropdown - Messages -->
                <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">
                  <form class="form-inline mr-auto w-100 navbar-search">
                    <div class="input-group">
                      <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2" />
                      <div class="input-group-append">
                        <button class="btn btn-primary" type="button">
                          <i class="fas fa-search fa-sm"></i>
                        </button>
                      </div>
                    </div>
                  </form>
                </div>
              </li>

              <!-- Nav Item - Alerts -->
              <li class="nav-item dropdown no-arrow mx-1">
                <a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fas fa-bell fa-fw"></i>
                  <!-- Counter - Alerts -->
                  <span class="badge badge-danger badge-counter">3+</span>
                </a>
                <!-- Dropdown - Alerts -->
                <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="alertsDropdown">
                  <h6 class="dropdown-header">警报中心</h6>
                  <a class="dropdown-item d-flex align-items-center" href="#">
                    <div class="mr-3">
                      <div class="icon-circle bg-primary">
                        <i class="fas fa-file-alt text-white"></i>
                      </div>
                    </div>
                    <div>
                      <div class="small text-gray-500">December 12, 2019</div>
                      <span class="font-weight-bold">准备下载新的月度报告!</span>
                    </div>
                  </a>
                  <a class="dropdown-item d-flex align-items-center" href="#">
                    <div class="mr-3">
                      <div class="icon-circle bg-success">
                        <i class="fas fa-donate text-white"></i>
                      </div>
                    </div>
                    <div>
                      <div class="small text-gray-500">December 7, 2019</div>
                      $290.29 已存入您的帐户!
                    </div>
                  </a>
                  <a class="dropdown-item d-flex align-items-center" href="#">
                    <div class="mr-3">
                      <div class="icon-circle bg-warning">
                        <i class="fas fa-exclamation-triangle text-white"></i>
                      </div>
                    </div>
                    <div>
                      <div class="small text-gray-500">December 2, 2019</div>
                      支出提醒：我们注意到您的帐户支出异常高.
                    </div>
                  </a>
                  <a class="dropdown-item text-center small text-gray-500" href="#">显示所有警报</a>
                </div>
              </li>

              <!-- Nav Item - Messages -->
              <li class="nav-item dropdown no-arrow mx-1">
                <a class="nav-link dropdown-toggle" href="#" id="messagesDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fas fa-envelope fa-fw"></i>
                  <!-- Counter - Messages -->
                  <span class="badge badge-danger badge-counter">7</span>
                </a>
                <!-- Dropdown - Messages -->
                <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="messagesDropdown">
                  <h6 class="dropdown-header">留言中心</h6>
                  <a class="dropdown-item d-flex align-items-center" href="#">
                    <div class="dropdown-list-image mr-3">
                      <img class="rounded-circle" src="/static/img/head/2016051616562635205.gif" alt="" />
                      <div class="status-indicator bg-success"></div>
                    </div>
                    <div class="font-weight-bold">
                      <div class="text-truncate">嗨，您好！ 我想知道您能否帮助我解决我一直遇到的问题.</div>
                      <div class="small text-gray-500">Emily Fowler · 58m</div>
                    </div>
                  </a>
                  <a class="dropdown-item d-flex align-items-center" href="#">
                    <div class="dropdown-list-image mr-3">
                      <img class="rounded-circle" src="/static/img/head/163147_4049085319042.gif" alt="" />
                      <div class="status-indicator"></div>
                    </div>
                    <div>
                      <div class="text-truncate">我有您上个月订购的照片，您希望它们如何发送给您?</div>
                      <div class="small text-gray-500">Jae Chun · 1d</div>
                    </div>
                  </a>
                  <a class="dropdown-item d-flex align-items-center" href="#">
                    <div class="dropdown-list-image mr-3">
                      <img class="rounded-circle" src="/static/img/head/2015122909594835969.gif" alt="" />
                      <div class="status-indicator bg-warning"></div>
                    </div>
                    <div>
                      <div class="text-truncate">上个月的报告看起来不错，我对到目前为止的进展感到非常满意，请继续努力!</div>
                      <div class="small text-gray-500">Morgan Alvarez · 2d</div>
                    </div>
                  </a>
                  <a class="dropdown-item d-flex align-items-center" href="#">
                    <div class="dropdown-list-image mr-3">
                      <img class="rounded-circle" src="/static/img/head/163146_3969983756542.gif" alt="" />
                      <div class="status-indicator bg-success"></div>
                    </div>
                    <div>
                      <div class="text-truncate">我是好男孩吗？ 我问的原因是因为有人告诉我人们对所有的狗都这样说，即使它们不好...</div>
                      <div class="small text-gray-500">Chicken the Dog · 2w</div>
                    </div>
                  </a>
                  <a class="dropdown-item text-center small text-gray-500" href="#">阅读更多消息</a>
                </div>
              </li>

              <div class="topbar-divider d-none d-sm-block"></div>

              <!-- Nav Item - User Information -->
              <li class="nav-item dropdown no-arrow">
                <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <span class="mr-2 d-none d-lg-inline text-gray-600 small">{{ admin.username }}</span>
                  <img class="img-profile rounded-circle" src="/static/img/head/rabbit.gif" />
                </a>
                <!-- Dropdown - User Information -->
                <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                  <a class="dropdown-item" href="#">
                    <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                    个人资料
                  </a>
                  <a class="dropdown-item" href="#">
                    <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
                    设定值
                  </a>
                  <a class="dropdown-item" href="#">
                    <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
                    活动日志
                  </a>
                  <div class="dropdown-divider"></div>
                  <a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
                    <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                    登出
                  </a>
                </div>
              </li>
            </ul>
          </nav>
          <!-- End of Topbar -->

          <!-- Begin Page Content -->
          <div class="container-fluid">
            {% for message in get_flashed_messages(with_categories=True) %}
            <div class="alert alert-{{ message[0] }}" role="alert" style="position: fixed; left: 24px; right: 24px; text-align: center">
              <button type="button" class="close" data-dismiss="alert">&times;</button>
              {{ message[1] }}
            </div>
            {% endfor %}
            <!-- Page Heading -->
            {% block content %}{% endblock content %}
          </div>
          <!-- /.container-fluid -->
        </div>
        <!-- End of Main Content -->

        <!-- Footer -->
        <footer class="sticky-footer bg-white">
          {% block footer %}
          <div class="container my-auto">
            <div class="copyright text-center my-auto">
              <span>版权 &copy; 你的网页 2020</span>
            </div>
          </div>
          {% endblock footer %}
        </footer>
        <!-- End of Footer -->
      </div>
      <!-- End of Content Wrapper -->
    </div>
    <!-- End of Page Wrapper -->

    <!-- Scroll to Top Button-->
    <a class="scroll-to-top rounded" href="#page-top">
      <i class="fas fa-angle-up"></i>
    </a>

    <!-- Logout Modal-->
    <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="exampleModalLabel">准备退出了?</h5>
            <button class="close" type="button" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">×</span>
            </button>
          </div>
          <div class="modal-body">如果您准备结束当前会话，请在下面选择“登出”.</div>
          <div class="modal-footer">
            <button class="btn btn-secondary" type="button" data-dismiss="modal">取消</button>
            <a class="btn btn-primary" href="{{ url_for('auth.logout') }}">登出</a>
          </div>
        </div>
      </div>
    </div>
    {% block scripts %}
    {% if not current_app.debug %}
        <!-- Bootstrap core JavaScript-->
        <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
        <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.5.3/js/bootstrap.bundle.min.js"></script>
        <!-- Core plugin JavaScript-->
        <script src="https://cdn.bootcdn.net/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js"></script>
        <!-- Custom scripts for all pages-->
        <script src="https://cdn.bootcdn.net/ajax/libs/startbootstrap-sb-admin-2/4.0.7/js/sb-admin-2.min.js"></script>
        <!-- Page level plugins -->
        <script src="{{ url_for('static', filename='vendor/datatables/jquery.dataTables.min.js') }}"></script>
        <script src="{{ url_for('static', filename='vendor/datatables/dataTables.bootstrap4.min.js') }}"></script>
        <!-- 模态消息对话框 https://sweetalert.js.org/ -->
        <script src="https://cdn.bootcdn.net/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script>
        <script src="{{  url_for('static',filename='js/sweetalert.min.js') }}"></script>
        <!-- 图片查看器 https://github.com/fengyuanchen/viewerjs -->
        <script src="https://cdn.bootcdn.net/ajax/libs/viewerjs/1.7.1/viewer.min.js"></script>
        <!-- 消息提示 https://github.com/marcelodolza/iziToast -->
        <script src="https://cdn.bootcdn.net/ajax/libs/izitoast/1.4.0/js/iziToast.min.js"></script>
        <!-- 复制到剪切板 https://github.com/zenorocha/clipboard.js -->
        <script src="https://cdn.bootcdn.net/ajax/libs/clipboard.js/2.0.6/clipboard.min.js"></script>
        <!-- 日期格式化 https://github.com/moment/moment -->
        {{ moment.include_moment(local_js='https://cdn.bootcdn.net/ajax/libs/moment.js/2.29.1/moment-with-locales.min.js') }} {{ moment.locale('zh-cn') }}
    {% else %}
        <!-- Bootstrap core JavaScript-->
        <script src="{{ url_for('static', filename='vendor/jquery/jquery.min.js') }}"></script>
        <script src="{{ url_for('static', filename='vendor/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
        <!-- Core plugin JavaScript-->
        <script src="{{ url_for('static', filename='vendor/jquery-easing/jquery.easing.min.js') }}"></script>
        <!-- Custom scripts for all pages-->
        <script src="{{ url_for('static', filename='js/sb-admin-2.min.js') }}"></script>
        <!-- Page level plugins -->
        <script src="{{ url_for('static', filename='vendor/chart.js/Chart.min.js') }}"></script>
        <!-- Page level custom scripts -->
        <script src="{{ url_for('static', filename='js/demo/chart-area-demo.js') }}"></script>
        <script src="{{ url_for('static', filename='js/demo/chart-pie-demo.js') }}"></script>
        <!-- Page level plugins -->
        <script src="{{ url_for('static', filename='vendor/datatables/jquery.dataTables.min.js') }}"></script>
        <script src="{{ url_for('static', filename='vendor/datatables/dataTables.bootstrap4.min.js') }}"></script>
        <!-- Page level custom scripts -->
        <script src="{{ url_for('static', filename='js/demo/datatables-demo.js') }}"></script>
        <!-- 模态消息对话框 https://sweetalert.js.org/ -->
        <script src="{{  url_for('static',filename='js/sweetalert.min.js') }}"></script>
        <!-- 图片查看器 https://github.com/fengyuanchen/viewerjs -->
        <script src="{{  url_for('static',filename='js/viewer.min.js') }}"></script>
        <!-- 复制到剪切板 https://github.com/zenorocha/clipboard.js -->
        <script src="{{  url_for('static',filename='js/clipboard.min.js') }}"></script>
        <!-- 日期格式化 https://github.com/moment/moment -->
        {{ moment.include_moment(local_js=url_for('static', filename='js/moment-with-locales.min.js')) }} {{ moment.locale('zh-cn') }}
        <!-- 消息提示 https://github.com/marcelodolza/iziToast -->
        <script src="{{ url_for('static',filename='js/iziToast.min.js') }}"></script>
    {% endif %}
    <!-- 加载效果 -->
    <script src="{{ url_for('static',filename='js/loading.js') }}"></script>
    <!-- 公共的js -->
    <script src="{{ url_for('static',filename='js/my.js') }}"></script>
    <script type="text/javascript">
      //消息闪现的定时关闭
      //setTimeout(function(){$('.alert').fadeOut(1000)},6000);
      $(function(){$('.alert').delay(6000).fadeOut(1000)});
      //加载层效果
      function loading(){
        $('body').loading({
          loadingWidth:120,
          title:'',
          name:'test',
          discription:'',
          direction:'column',
          type:'origin',
          // originBg:'#71EA71',
          originDivWidth:40,
          originDivHeight:40,
          originWidth:6,
          originHeight:6,
          smallLoading:false,
          loadingMaskBg:'rgba(0,0,0,0.2)'
        });
      }
    </script>
    {% endblock %}
  </body>
</html>
